import service from '@/utils/request'

// @Tags Centers
// @Summary 创建Centers
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Centers true "创建Centers"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /center/createCenters [post]
export const createCenters = (data) => {
  return service({
    url: '/center/createCenters',
    method: 'post',
    data
  })
}

// @Tags Centers
// @Summary 删除Centers
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Centers true "删除Centers"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /center/deleteCenters [delete]
export const deleteCenters = (data) => {
  return service({
    url: '/center/deleteCenters',
    method: 'delete',
    data
  })
}

// @Tags Centers
// @Summary 删除Centers
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除Centers"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /center/deleteCenters [delete]
export const deleteCentersByIds = (data) => {
  return service({
    url: '/center/deleteCentersByIds',
    method: 'delete',
    data
  })
}

// @Tags Centers
// @Summary 更新Centers
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Centers true "更新Centers"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /center/updateCenters [put]
export const updateCenters = (data) => {
  return service({
    url: '/center/updateCenters',
    method: 'put',
    data
  })
}

// @Tags Centers
// @Summary 用id查询Centers
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Centers true "用id查询Centers"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /center/findCenters [get]
export const findCenters = (params) => {
  return service({
    url: '/center/findCenters',
    method: 'get',
    params
  })
}

// @Tags Centers
// @Summary 分页获取Centers列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取Centers列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /center/getCentersList [get]
export const getCentersList = (params) => {
  return service({
    url: '/center/getCentersList',
    method: 'get',
    params
  })
}
